Skip to content

Stop external-builder envelope 404 after block publication - #9948

Open
jimmygchen wants to merge 13 commits into
sigp:stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620from
jimmygchen:fix-external-builder-envelope-404
Open

Stop external-builder envelope 404 after block publication#9948
jimmygchen wants to merge 13 commits into
sigp:stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620from
jimmygchen:fix-external-builder-envelope-404

Conversation

@jimmygchen

Copy link
Copy Markdown
Member

After publishing a Gloas beacon block selected from an external builder, the validator client immediately fetches the payload envelope from its beacon node. That endpoint only serves locally built envelopes, so it returns 404 before the selected builder publishes its envelope. The block still lands, but the validator client reports Error whilst producing block.

The validator client now fetches, signs, and publishes an envelope only when the selected bid has builder_index == BUILDER_INDEX_SELF_BUILD. For an external builder, it stops after publishing the signed beacon block.

ethDreamer and others added 4 commits August 26, 2026 14:12
…(Gloas builder API 3/5)

Third PR of the Gloas builder API stack:

- beacon_chain: direct builder bid verification (spawned on the blocking
  executor), gossip-bid refinements, wei-domain bid selection
  (`BidCandidate`/`BidSource`), and Gloas block production that assembles
  local, gossip, and direct-builder candidates
- network: process payload-bid and proposer-preference gossip, including the
  new `PayloadBidError` variants
- client: construct the `Builders` service when the Gloas fork is scheduled
  and wire it into the beacon chain

The HTTP API still serves `GET` produceBlockV4 at this point; the `POST`
conversion and the `Eth-Builder-Url` round-trip land in the next PR.

Change-Id: Ieccaee5db81bf871c19cef1b79fc48283be9dd51
…builder API 4/5)

Fourth PR of the Gloas builder API stack (beacon-APIs sigp#630):

- convert `/eth/v4/validator/blocks/{slot}` to POST with an optional
  `BuilderConfig` body (min_bid, builder_boost_factor, direct builders)
- add `POST /eth/v1/validator/builder_preferences` for forwarding signed
  builder preferences
- set `Eth-Builder-Url` on produceBlockV4 responses when a direct-builder bid
  wins, accept it on `POST /eth/v2/beacon/blocks`, and forward the signed
  block to that builder

The validator client still uses the legacy GET methods at this point; it
migrates in the final PR of this stack.

Change-Id: I0ad30b8f36ad9b588ea1a0398220f92c9597bb95
…API 5/5)

Final PR of the Gloas builder API stack:

- sign builder request-auth and preferences (REQUEST_AUTH signing domain,
  web3signer message type)
- add the builder configuration store (`builder_definitions.yml`) and book
  documentation
- add the builder-preferences service and switch block production to
  `POST` produceBlockV4 with a `BuilderConfig` body, threading the
  `Eth-Builder-Url` header through block publication
- remove the now-unused legacy `GET` produceBlockV4 client methods

Change-Id: Iaeeaf6205a024e4fb9fd11aae6ac6a75978a8320
Changes:
Skip validator payload-envelope handling after external-builder block publication.
Cover self-build and external-builder envelope behaviour.
@jimmygchen
jimmygchen marked this pull request as ready for review August 31, 2026 07:15
@jimmygchen jimmygchen added the ready-for-review The code is ready for review label Aug 31, 2026
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620 branch from 44f4424 to 17bcbc2 Compare September 1, 2026 17:18
@ethDreamer
ethDreamer requested a review from jxs as a code owner September 1, 2026 17:18
@mergify

mergify Bot commented Sep 1, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Could you please resolve them @jimmygchen? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Sep 1, 2026
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620 branch from 17bcbc2 to 7c1ffce Compare September 1, 2026 18:32
Comment on lines +602 to +603
publish_envelope =
signed_execution_payload_bid.message.builder_index == BUILDER_INDEX_SELF_BUILD;

@shane-moore shane-moore Sep 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reads the bid from this VC's own produce response, before sign_and_publish_block swaps in the block the cluster agreed on. for a DVT store those differ: one validator key is split into shares across N independent VC+BN pairs (SSV operators), sign_block runs consensus across them and usually returns another VC's block, and a threshold have to sign for anything to publish. so when this VC's own bid is external while the agreed block is self-build, the envelope step is skipped here and this VC's share goes missing. the reverse runs it with nothing to reveal.

sign_and_publish_block already holds the signed_block and drops it. suggest returning it (or just its bid) and deriving publish_envelope from that after the call. no-op for a normal store, where the block that comes back is the one that went in.

one thing to leave as-is: the fetch root. keep payload_envelope_block_root as unsigned_block.block_root(), just unconditionally. on the VC that built the agreed block the two roots are equal; on the others the agreed root is not in their own BN's pending_payload_envelopes (local building only, validator/execution_payload_envelopes.rs 404s otherwise), so keying on it would 404 everywhere and the store would never be called. they still need to sign, and anchor discards the fetched envelope on them anyway, so the fetch only has to succeed.

going to think deeper if i can handle this on anchor side, so commenting out the above for now

@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620 branch from 7c1ffce to 58eedb5 Compare September 2, 2026 15:53
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620 branch 2 times, most recently from 2c3656e to 39cf3c2 Compare September 3, 2026 21:03
…(Gloas builder API 3/5)

Third PR of the Gloas builder API stack:

- beacon_chain: direct builder bid verification (spawned on the blocking
  executor), gossip-bid refinements, wei-domain bid selection
  (`BidCandidate`/`BidSource`), and Gloas block production that assembles
  local, gossip, and direct-builder candidates
- network: process payload-bid and proposer-preference gossip, including the
  new `PayloadBidError` variants
- client: construct the `Builders` service when the Gloas fork is scheduled
  and wire it into the beacon chain

The HTTP API still serves `GET` produceBlockV4 at this point; the `POST`
conversion and the `Eth-Builder-Url` round-trip land in the next PR.

Change-Id: Ieccaee5db81bf871c19cef1b79fc48283be9dd51
…builder API 4/5)

Fourth PR of the Gloas builder API stack (beacon-APIs sigp#630):

- convert `/eth/v4/validator/blocks/{slot}` to POST with an optional
  `BuilderConfig` body (min_bid, builder_boost_factor, direct builders)
- add `POST /eth/v1/validator/builder_preferences` for forwarding signed
  builder preferences
- set `Eth-Builder-Url` on produceBlockV4 responses when a direct-builder bid
  wins, accept it on `POST /eth/v2/beacon/blocks`, and forward the signed
  block to that builder

The validator client still uses the legacy GET methods at this point; it
migrates in the final PR of this stack.

Change-Id: I0ad30b8f36ad9b588ea1a0398220f92c9597bb95
…API 5/5)

Final PR of the Gloas builder API stack:

- sign builder request-auth and preferences (REQUEST_AUTH signing domain,
  web3signer message type)
- add the builder configuration store (`builder_definitions.yml`) and book
  documentation
- add the builder-preferences service and switch block production to
  `POST` produceBlockV4 with a `BuilderConfig` body, threading the
  `Eth-Builder-Url` header through block publication
- remove the now-unused legacy `GET` produceBlockV4 client methods

Change-Id: Iaeeaf6205a024e4fb9fd11aae6ac6a75978a8320
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620 branch from 39cf3c2 to 9abe9a1 Compare September 3, 2026 22:40
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620 branch from 9abe9a1 to 58fba0d Compare September 8, 2026 17:21
…builder API 4/5)

Fourth PR of the Gloas builder API stack (beacon-APIs sigp#630):

- convert `/eth/v4/validator/blocks/{slot}` to POST with an optional
  `BuilderConfig` body (min_bid, builder_boost_factor, direct builders)
- add `POST /eth/v1/validator/builder_preferences` for forwarding signed
  builder preferences
- set `Eth-Builder-Url` on produceBlockV4 responses when a direct-builder bid
  wins, accept it on `POST /eth/v2/beacon/blocks`, and forward the signed
  block to that builder

The validator client still uses the legacy GET methods at this point; it
migrates in the final PR of this stack.

Change-Id: I0ad30b8f36ad9b588ea1a0398220f92c9597bb95
…API 5/5)

Final PR of the Gloas builder API stack:

- sign builder request-auth and preferences (REQUEST_AUTH signing domain,
  web3signer message type)
- add the builder configuration store (`builder_definitions.yml`) and book
  documentation
- add the builder-preferences service and switch block production to
  `POST` produceBlockV4 with a `BuilderConfig` body, threading the
  `Eth-Builder-Url` header through block publication
- remove the now-unused legacy `GET` produceBlockV4 client methods

Change-Id: Iaeeaf6205a024e4fb9fd11aae6ac6a75978a8320
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620 branch from 58fba0d to 2a6fc09 Compare September 8, 2026 22:42
@jimmygchen jimmygchen added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Sep 9, 2026
@ethDreamer
ethDreamer force-pushed the stack/ethDreamer/gloas-builder-api-stacked/migrate-validator-client-gloas-builder-api-gloas--aeeaf620 branch from 2a6fc09 to a434c7d Compare September 9, 2026 14:33
@mergify

mergify Bot commented Sep 9, 2026

Copy link
Copy Markdown

This pull request has merge conflicts. Could you please resolve them @jimmygchen? 🙏

@mergify mergify Bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gloas waiting-on-author The reviewer has suggested changes and awaits thier implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants